package cc.ailley.singleton.lazy;

/**
 * 加锁模式(线程安全)
 */
public class SyncLazy {

    private SyncLazy(){};

    private static SyncLazy instance = null;

    public static synchronized SyncLazy getInstance(){
        if(instance == null){
            instance = new SyncLazy();
        }
        return instance;
    }
}
